<template>
  <div>
    <h1>点击li必须使用编程式导航</h1>
    <h2>收到！over!</h2>
    <ul>
      <li @click="goSing(index)" v-for="(item,index) in list" :key="index">{{item}}</li>
    </ul>
  </div>
</template>

<script>
export default {
  data () {
    return {
      list: ['青藏高原', '三天三夜', '叶子', '蝶恋花', '幸运星']
    }
  },

  created () {

  },

  methods: {
    goSing (index) {
      this.$router.push({
        name: 'Music',
        params: {
          id: index + 1
        }
      })
    }
  }
}
</script>

<style scoped lang='less'>

</style>
